package com.takeaway.dao.daolmpl;

import com.takeaway.dao.daointerface.MsgBoardDao;
import com.takeaway.pojo.MsgBoard;
import com.takeaway.utils.JdbcUtils;

import java.util.ArrayList;

/**
 * @author 后台赖骏
 */
public class MsgBoardImpl implements MsgBoardDao {
    @Override
    public int insert(MsgBoard msgBoard) throws Exception{
        return JdbcUtils.insert(msgBoard);
    }

    @Override
    public int delete(Class<MsgBoard> clz, String[] checkField, Object... factor) throws Exception{
        return JdbcUtils.delete(clz,checkField,factor);
    }

    @Override
    public int update(MsgBoard msgBoard) throws Exception{
        return JdbcUtils.update(msgBoard);
    }

    @Override
    public MsgBoard selectSingle(MsgBoard msgBoard, String[] checkFields, Object... factor) throws Exception{
        return (MsgBoard) JdbcUtils.selectSingle(msgBoard,checkFields,factor);
    }

    @Override
    public ArrayList<MsgBoard> selectMore(Class<MsgBoard> clz, int begin, int listNum) throws Exception{
        return (ArrayList<MsgBoard>) JdbcUtils.selectMore(clz,begin,listNum);
    }

    @Override
    public ArrayList<MsgBoard> selectMore(Class<MsgBoard> clz, String[] checkField, Object... factor) throws Exception{
        return (ArrayList<MsgBoard>) JdbcUtils.selectMore(clz,checkField,factor);
    }
    
}
